package com.example;

import de.greenrobot.daogenerator.DaoGenerator;
import de.greenrobot.daogenerator.Entity;
import de.greenrobot.daogenerator.Schema;

public class MyClass {
    public static void main(String[]args){
        Schema schema = new Schema(1,"com.lanou.renrenxin.dao");
        //离线新闻数据
        Entity chatList = schema.addEntity("ChatList");
        //数据库的字段名
        chatList.addStringProperty("mUsername");
        chatList.addStringProperty("username").primaryKey();
        chatList.addStringProperty("body");
        chatList.addIntProperty("type");
        chatList.addStringProperty("time");
        chatList.addIntProperty("status");
        chatList.addStringProperty("msg_type");
        try {
            new DaoGenerator().generateAll(schema,"./app/src/main/java");
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
